<?php
function get_serverinfo($serverid)
{
	switch($serverid)
	{
		case 1:
			return "10.105.63.124";
		case 2:
			return "10.105.63.124";
		case 5:
			return "10.105.63.124";
		case 7:
			return "10.105.63.124";
		case 9:
			return "10.105.63.124";
		case 11:
			return "10.105.63.124";
		case 13:
			return "10.105.63.124";
		case 15:
			return "10.105.63.124";
		case 17:
			return "10.105.63.124";
		case 19:
			return "10.105.63.124";
			
		case 3:
			return "10.105.124.54";
		case 4:
			return "10.105.124.54";
		case 6:
			return "10.105.124.54";
		case 8:
			return "10.105.124.54";
		case 10:
			return "10.105.124.54";
		case 12:
			return "10.105.124.54";
		case 14:
			return "10.105.124.54";
		case 16:
			return "10.105.124.54";
		case 18:
			return "10.105.124.54";
			
		case 1001:
			return "10.105.63.124";
		case 1002:		
			return "10.105.63.124";
		case 1005:
			return "10.105.63.124";
		case 1007:		
		case 1009:
		case 1011:
		case 1013:
		case 1015:
		case 1017:
		case 1019:
			return "10.105.63.124";
		case 1003:
			return "10.105.124.54";
		case 1004:
			return "10.105.124.54";
		case 1006:
			return "10.105.124.54";
		case 1008:
		case 1010:
		case 1012:
		case 1014:
		case 1016:
		case 1018:
		case 1020:
			return "10.105.124.54";
			
		case 999:
			return "10.105.63.124";
		case 1999:
			return "10.105.63.124";
		default:
			return "10.105.63.124";
	}
}

function get_auth_server($serverid)
{
	$config = array('host' => get_serverinfo($serverid), 'port' => '31415'); 
	return $config;
}

//AuthServer 配置
function get_authServer_info($app)
{
	if(empty($app)){$app = 'DOD';}
	$config = array('DOD' => array('host' => '10.105.63.124', 'port' => '31415')) ; 
	return $config[$app];
}

//gmServer配置
function get_gm_server_info($app)
{
	if(empty($app)) {$app = 'DOD';}
	$config = array('DOD' => array('host' => '10.105.63.124', 'port' => '8080')) ; 
	return $config[$app];	
}

//payServer配置
function get_pay_server_info($serverid)
{
	$payserverinfo = array('host' => get_serverinfo($serverid), 'port' => '8088');
	return $payserverinfo;
	//if(empty($app)) {$app = '1';}
	//$config = array('1' => array('host' => '10.105.63.124', 'port' => '8088'),'2' => array('host' => '10.105.63.124', 'port' => '8088'),'3' => array('host' => '10.105.124.54', 'port' => '8088'), '99' => array('host' => '10.105.63.124', 'port' => '8088')) ; 
	//return $config[$app];	
}
?>
